import { getItem, TOKEN } from '@hs-admin/utils'
import { useSearchParams } from 'react-router-dom'

const CompanyIframe = () => {
  // react 获取路由传参
  const [searchParams]: any = useSearchParams()
  const url = `${import.meta.env.VITE_COMPANY_EXPLORE}/#/businessCheck/pcLight/components/businessList/?
  theme=light&token=${getItem(TOKEN)}&keywords=${searchParams.get('keywords') ?? ''}&source=industryWarning`

  return (
    <div className="w-full flex-1 overflow-hidden box-border">
      <iframe title="企业探查" src={url} className="w-full h-full border-none" />
    </div>
  )
}

export default CompanyIframe
